package com;

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;

import com.ciko.code.constant.Api;
import com.ciko.code.constant.Constants;
import com.shwread.http.base.AsyncHttpClient;
import com.shwread.http.base.FileAsyncHttpResponseHandler;
import com.shwread.http.base.RequestParams;
import com.shwread.http.base.ResponseHandlerInterface;
import com.shwread.http.util.Base64;
import com.shwread.http.util.LogLevel;
import com.shwread.http.util.Logger;
import com.shwread.http.util.MD5;

import org.apache.http.Header;
import org.apache.http.message.BasicHeader;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;

public class NewActionHelp {
    public static final String CONTENTTYPE = "application/xml;charset=UTF-8";
    public static final String UPLOAD_CONTENTTYPE = "application/octet-stream";
//    private static final String URL_R = "http://42.121.255.69:8080/hzlqswserver/";
    private static final String URL_R = Api.ROOT_URL_TAIBAO;
    private static final String CHARTSET = "UTF-8";
    private static final String APPID = "shanwen";
    public static String BLUELION_URL = "http://stage0.smartlionapp.com";
    private static String ENTERPRISE_ID = Constants.enterprise_num;
    private static String LOGIN_KEY = "LQSW@)!$";
    private static String ACCOUNTTYPE = "1";
    private static String CLIENTTYPE = "android_1.0.0";
    private static String CLIENT_IMEI;
    private static String USER_IP;
    private static String ACCOUNT;
    private static String URL;
    private static boolean ISRELEASE;
    private static AsyncHttpClient client = new AsyncHttpClient();
    private static String APPSECRET = "4db4ee6ee1337733a7e977af600a1f33";

    public NewActionHelp() {
    }

    public static void uploadImgForWorkFlow(Context context, String enclosure, String url, ResponseHandlerInterface handler) throws FileNotFoundException {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("enterpriseId", String.valueOf(ENTERPRISE_ID));
        params.put("enclosure", new File(enclosure), "application/octet-stream");
        params.put("cid", cid(ACCOUNT + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID));
        client.post(context, url + "uploadImgForWorkFlow.do", getHeaders(context), params, "application/octet-stream", handler);
    }

    public static void init(String imei, String psdnIp, boolean isRelease) {
        CLIENT_IMEI = TextUtils.isEmpty(imei) ? "" : imei;
        USER_IP = TextUtils.isEmpty(psdnIp) ? "" : psdnIp;
        ISRELEASE = isRelease;
//        URL = isRelease?"http://42.121.255.69:8080/hzlqswserver/":"http://42.121.255.69:8080/hzlqswserver/";
        URL = URL_R;
        Logger.init(ISRELEASE ? LogLevel.NONE : LogLevel.FULL);
    }

    public static void initLion(boolean isRelease) {
        BLUELION_URL = isRelease ? "http://beta.smartlionapp.com" : "http://beta.smartlionapp.com";
        APPSECRET = isRelease ? "ZWgNG7pRAoxrFGXbYMHo9raqwAwfnLvc" : "4db4ee6ee1337733a7e977af600a1f33";
    }

    public static String getEnterpriseId() {
        return ENTERPRISE_ID;
    }

    public static void setEnterpriseId(String enterpriseId) {
        ENTERPRISE_ID = enterpriseId;
    }

    public static String getAccountType() {
        return ACCOUNTTYPE;
    }

    public static void setAccountType(String accountType) {
        ACCOUNTTYPE = accountType;
    }

    public static String getClientType() {
        return CLIENTTYPE;
    }

    public static void setClientType(String clientType) {
        CLIENTTYPE = clientType;
    }

    public static String getAccount() {
        return ACCOUNT;
    }

    public static void setAccount(String account) {
        ACCOUNT = account;
    }

    public static String getUrl() {
        return URL;
    }

    public static String getLoginKey() {
        return LOGIN_KEY;
    }

    public static void setLoginKey(String key) {
        if (!TextUtils.isEmpty(key)) {
            LOGIN_KEY = key;
        }

    }

    public static void setDefaultLoginKey() {
        LOGIN_KEY = "LQSW@)!$";
    }

    public static void cancel(Context context) {
        if (client != null && context != null) {
            client.cancelRequests(context);
        }

    }

    public static void cancelAll() {
        if (client != null) {
            client.cancelAllRequests(true);
        }

    }

    public static void destroy() {
        if (client != null) {
            client.cancelAllRequests(true);
            client = null;
        }

        CLIENT_IMEI = null;
        USER_IP = null;
    }

    private static RequestParams getRequestParams(String timeStamp) {
        RequestParams params = new RequestParams();
        params.put("accountType", ACCOUNTTYPE);
        params.put("clientType", CLIENTTYPE);
        params.put("enterpriseId", ENTERPRISE_ID);
        if (!TextUtils.isEmpty(ACCOUNT)) {
            params.put("account", ACCOUNT);
        }

        params.put("timeStamp", timeStamp);
        return params;
    }

    private static RequestParams getRequestParams(String timeStamp, String account) {
        RequestParams params = new RequestParams();
        params.put("accountType", ACCOUNTTYPE);
        params.put("clientType", CLIENTTYPE);
        params.put("enterpriseId", ENTERPRISE_ID);
        if (!TextUtils.isEmpty(account)) {
            params.put("account", account);
        }

        params.put("timeStamp", timeStamp);
        return params;
    }

    public static void get(Context context, String url, ResponseHandlerInterface handler) {
        client.get(context, url, handler);
    }

    public static void post(Context context, String url, RequestParams params, ResponseHandlerInterface handler) {
        client.post(context, url, params, handler);
    }

    public static void download(Context context, String url, FileAsyncHttpResponseHandler handler) {
        client.get(context, url, handler);
    }

    public static void registerAccount(Context context, String account, String password, String username, int sex, String nickname, String birthday, String homeTown, String liveNow, String interest, String job, String desc, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("enterpriseId", String.valueOf(ENTERPRISE_ID));
        params.put("password", MD5.MD5Encode(password));
        params.put("sex", String.valueOf(sex));
        if (!TextUtils.isEmpty(username)) {
            params.put("username", String.valueOf(username));
        }

        if (!TextUtils.isEmpty(nickname)) {
            params.put("nickname", String.valueOf(nickname));
        }

        if (!TextUtils.isEmpty(birthday)) {
            params.put("birthday", birthday);
        }

        if (!TextUtils.isEmpty(homeTown)) {
            params.put("homeTown", homeTown);
        }

        if (!TextUtils.isEmpty(liveNow)) {
            params.put("liveNow", liveNow);
        }

        if (!TextUtils.isEmpty(interest)) {
            params.put("interest", interest);
        }

        if (!TextUtils.isEmpty(job)) {
            params.put("job", job);
        }

        if (!TextUtils.isEmpty(desc)) {
            params.put("desc", desc);
        }

        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID + MD5.MD5Encode(password)));
        client.post(context, getUrl("registerAccount.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void modUserAccountInfo(Context context, String nickName, String sex, String birthday, String contactPhone, String contactMail, String contactAddress, String homeTown, String liveNow, String interest, String job, String desc, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        if (!TextUtils.isEmpty(nickName)) {
            params.put("nickName", nickName);
        }

        if (!TextUtils.isEmpty(sex)) {
            params.put("sex", sex);
        }

        if (!TextUtils.isEmpty(birthday)) {
            params.put("birthday", birthday);
        }

        if (!TextUtils.isEmpty(contactPhone)) {
            params.put("contactPhone", contactPhone);
        }

        if (!TextUtils.isEmpty(contactMail)) {
            params.put("contactMail", contactMail);
        }

        if (!TextUtils.isEmpty(contactAddress)) {
            params.put("contactAddress", contactAddress);
        }

        if (!TextUtils.isEmpty(homeTown)) {
            params.put("homeTown", homeTown);
        }

        if (!TextUtils.isEmpty(liveNow)) {
            params.put("liveNow", liveNow);
        }

        if (!TextUtils.isEmpty(interest)) {
            params.put("interest", interest);
        }

        if (!TextUtils.isEmpty(job)) {
            params.put("job", job);
        }

        if (!TextUtils.isEmpty(desc)) {
            params.put("desc", desc);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("modUserAccountInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserCreditCard(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryUserCreditCard.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void delUserCreditCard(Context context, long id, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("id", String.valueOf(id));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + id));
        client.post(context, getUrl("delUserCreditCard.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryStoreByLocations(Context context, float longitude, float latitude, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("longitude", Float.valueOf(longitude));
        params.put("latitude", Float.valueOf(latitude));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + longitude + latitude));
        client.post(context, getUrl("qryStoreByLocations.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryAreaTablesInfoByStoreId(Context context, long storeId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("storeId", storeId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + storeId));
        client.post(context, getUrl("qryAreaTablesInfoByStoreId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBHByStoreId(Context context, long storeId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("storeId", storeId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + storeId));
        client.post(context, getUrl("qryBHByStoreId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmAppiontment(Context context, long storeId, String tableInfo, long appiontmentDate, String appiontmentTime, int peopleNum, String phone, String remark, String userName, int userSex, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("storeId", storeId);
        params.put("tableInfo", tableInfo);
        params.put("appiontmentDate", appiontmentDate);
        params.put("appiontmentTime", appiontmentTime);
        params.put("peopleNum", peopleNum);
        params.put("phone", phone);
        params.put("remark", remark);
        params.put("userName", userName);
        params.put("userSex", userSex);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + storeId + tableInfo + appiontmentDate + appiontmentTime + peopleNum + phone));
        client.post(context, getUrl("confirmAppiontment.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void cancelAppiontment(Context context, long appiontmentId, String remark, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("appiontmentId", appiontmentId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + appiontmentId));
        client.post(context, getUrl("cancelAppiontment.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryAppiontmentList(Context context, long lastCreateTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastCreateTime", lastCreateTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastCreateTime + length));
        client.post(context, getUrl("qryAppiontmentList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryFoodListByStoreId(Context context, long storeId, int position, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("storeId", storeId);
        params.put("position", position);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + storeId + position));
        client.post(context, getUrl("qryFoodListByStoreId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmOrderWithTakeAway(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmOrderWithTakeAway.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryShopActivityList(Context context, long shopId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("shopId", shopId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + shopId));
        client.post(context, getUrl("qryShopActivityList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryOrderListWithTakeAway(Context context, long lastCreateTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastCreateTime", lastCreateTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastCreateTime + length));
        client.post(context, getUrl("qryOrderListWithTakeAway.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryOrderDetailWithTakeAway(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryOrderDetailWithTakeAway.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void comfirmReceive(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("comfirmReceive.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryFoodsDetail(Context context, long foodsId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("foodsId", foodsId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + foodsId));
        client.post(context, getUrl("qryFoodsDetail.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void cancelTakeAwayOrder(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("cancelTakeAwayOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void deleteTakeAwayOrder(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("deleteTakeAwayOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qyrUserOrderTotal(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qyrUserOrderTotal.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qyrUserCanInvoiceOrders(Context context, int length, long lastOrderTime, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", length);
        params.put("lastOrderTime", lastOrderTime);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + length + lastOrderTime));
        client.post(context, getUrl("qyrUserCanInvoiceOrders.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmGoodsOrderInvoice(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmGoodsOrderInvoice.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsOrderInvoiceRecordList(Context context, int length, long lastCreateTime, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", length);
        params.put("lastCreateTime", lastCreateTime);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + length + lastCreateTime));
        client.post(context, getUrl("qryGoodsOrderInvoiceRecordList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsOrderInvoiceInfo(Context context, long invoiceId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("invoiceId", invoiceId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + invoiceId));
        client.post(context, getUrl("qryGoodsOrderInvoiceInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserInvoiceList(Context context, long lastCreateTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastCreateTime", lastCreateTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastCreateTime + length));
        client.post(context, getUrl("qryUserInvoiceList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryInvoiceRemainAmount(Context context, long shopId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("shopId", shopId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + shopId));
        client.post(context, getUrl("qryInvoiceRemainAmount.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryAutoServiceBanners(Context context, int position, int limit, long shopId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("position", position);
        params.put("limit", limit);
        params.put("shopId", shopId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + position));
        client.post(context, getUrl("qryAutoServiceBanners.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void invoiceForUser(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("invoiceForUser.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserVoucherList(Context context, int status, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("status", status);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + status));
        client.post(context, getUrl("qryUserVoucherList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void checkPayPasswordExist(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("checkPayPasswordExist.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void setPayPassword(Context context, String password, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("password", MD5.MD5Encode(password));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + MD5.MD5Encode(password)));
        client.post(context, getUrl("setPayPassword.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void changePayPassword(Context context, String oldPassword, String newPassword, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("oldPassword", MD5.MD5Encode(oldPassword));
        params.put("newPassword", MD5.MD5Encode(newPassword));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + MD5.MD5Encode(oldPassword) + MD5.MD5Encode(newPassword)));
        client.post(context, getUrl("changePayPassword.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserBalance(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryUserBalance.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void newBalanceRechargeOrder(Context context, long totalMoney, int channel, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("totalMoney", totalMoney);
        params.put("channel", channel);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + totalMoney + channel));
        client.post(context, getUrl("newBalanceRechargeOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void closeBalanceRechargeOrder(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("closeBalanceRechargeOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBalanceRechargeOrderList(Context context, long lastCreateTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastCreateTime", lastCreateTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastCreateTime + length));
        client.post(context, getUrl("qryBalanceRechargeOrderList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserBalanceTradeList(Context context, int type, int tradeType, long lastCreateTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("type", type);
        params.put("tradeType", tradeType);
        params.put("lastCreateTime", lastCreateTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + type + tradeType + lastCreateTime + length));
        client.post(context, getUrl("qryUserBalanceTradeList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void payOrderByUserBalance(Context context, long orderId, int orderType, String password, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("orderType", orderType);
        params.put("password", MD5.MD5Encode(password));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId + orderType + MD5.MD5Encode(password)));
        client.post(context, getUrl("payOrderByUserBalance.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryStaffInfoByAccIds(Context context, String memberAccIds, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("memberAccIds", memberAccIds);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + memberAccIds));
        client.post(context, getUrl("qryStaffInfoByAccIds.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryMemberListByTeamId(Context context, String teamId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamId", teamId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + teamId));
        client.post(context, getUrl("qryMemberListByTeamId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryMyContactWithBoss(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryMyContactWithBoss.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void inviteMember(Context context, String teamId, String teamName, String memberUids, String msg, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamName", teamName);
        params.put("teamId", teamId);
        params.put("memberUids", memberUids);
        if (!TextUtils.isEmpty(msg)) {
            params.put("msg", msg);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + teamId + memberUids));
        client.post(context, getUrl("inviteMember.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void kickMember(Context context, String teamId, String memberAccId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamId", teamId);
        params.put("memberAccId", memberAccId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + teamId + memberAccId));
        client.post(context, getUrl("kickMember.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void dismissTeam(Context context, String teamId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamId", teamId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + teamId));
        client.post(context, getUrl("dismissTeam.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void createTeam(Context context, String teamName, String memberUids, String msg, String isAllowPerson, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamName", teamName);
        params.put("memberUids", memberUids);
        if (!TextUtils.isEmpty(msg)) {
            params.put("msg", msg);
        }

        if (!TextUtils.isEmpty(isAllowPerson)) {
            params.put("isAllowPerson", isAllowPerson);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + memberUids));
        client.post(context, getUrl("createTeam.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void updateTeam(Context context, String teamId, String teamName, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("teamId", teamId);
        params.put("teamName", teamName);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + teamId));
        client.post(context, getUrl("updateTeam.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryMyBoss(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryMyBoss.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTopicList(Context context, int page, int pageNum, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("page", page);
        params.put("pageNum", pageNum);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qryTopicList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTopicActivityList(Context context, long currentPublishTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("currentPublishTime", currentPublishTime);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + currentPublishTime + length));
        client.post(context, getUrl("qryTopicActivityList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHaveNewestTopicActivity(Context context, long lastQryTime, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastQryTime", lastQryTime);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastQryTime));
        client.post(context, getUrl("qryHaveNewestTopicActivity.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void addTopic(Context context, String content, ResponseHandlerInterface handler, String... paths) throws FileNotFoundException {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("content", content);
        if (paths != null && paths.length > 0) {
            for (int i = 0; i < paths.length && i < 6; ++i) {
                params.put("image" + (i + 1), new File(paths[i]), "application/octet-stream");
            }
        } else {
            params.put("image1", new ByteArrayInputStream(new byte[0]), "test.jpg", "application/octet-stream");
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("addTopic.do"), getHeaders(context), params, "application/octet-stream", handler);
    }

    public static void qryEnterpriseDictionary(Context context, int type, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("type", type);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + type));
        client.post(context, getUrl("qryEnterpriseDictionary.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseAdvertiseMentStartPage(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid(ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseAdvertiseMentStartPage.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void recordUserReadBook(Context context, long bookId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("bookId", bookId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + bookId));
        client.post(context, getUrl("recordUserReadBook.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsBase(Context context, long goodsId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("goodsId", goodsId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + goodsId));
        client.post(context, getUrl("qryGoodsBase.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTouristTicketInfoList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", pageNum);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryTouristTicketInfoList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTouristHotelInfoList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", pageNum);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        Log.e("请求的url", getUrl("qryTouristHotelInfoList.do"));
        client.post(context, getUrl("qryTouristHotelInfoList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTouristTicketInfo(Context context, long ticketId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("ticketId", ticketId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + ticketId));
        client.post(context, getUrl("qryTouristTicketInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTouristHotelInfo(Context context, long hotelId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("hotelId", hotelId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + hotelId));
        client.post(context, getUrl("qryTouristHotelInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmTicketOrder(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmTicketOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmHotelOrder(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmHotelOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTicketOrderBarcode(Context context, int orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryTicketOrderBarcode.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTicketOrderList(Context context, String status, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("status", status);
        params.put("pageNum", pageNum);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + status + pageNum + length));
        client.post(context, getUrl("qryTicketOrderList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHotelOrderList(Context context, String status, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("status", status);
        params.put("pageNum", pageNum);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + status + pageNum + length));
        client.post(context, getUrl("qryHotelOrderList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryTicketOrderInfo(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryTicketOrderInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHotelOrderInfoDetail(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryHotelOrderInfoDetail.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserDeliveryAddress(Context context, boolean onlyQryDefault, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        String str = String.valueOf(onlyQryDefault);
        Logger.d(str);
        params.put("onlyQryDefault", str);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + str));
        client.post(context, getUrl("qryUserDeliveryAddress.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void addUserDeliveryAddress(Context context, String name, String phone, int areaAddressId, String detailAddress, String zipCode, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("name", name);
        params.put("phone", phone);
        params.put("areaAddressId", String.valueOf(areaAddressId));
        params.put("detailAddress", detailAddress);
        if (!TextUtils.isEmpty(zipCode)) {
            params.put("zipCode", zipCode);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("addUserDeliveryAddress.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void updateUserDeliveryAddress(Context context, long addressId, boolean isDefault, String name, String phone, Integer areaAddressId, String detailAddress, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("addressId", String.valueOf(addressId));
        params.put("isDefault", String.valueOf(isDefault));
        if (!TextUtils.isEmpty(name)) {
            params.put("name", name);
        }

        if (!TextUtils.isEmpty(phone)) {
            params.put("phone", phone);
        }

        if (areaAddressId != null) {
            params.put("areaAddressId", String.valueOf(areaAddressId));
        }

        if (!TextUtils.isEmpty(detailAddress)) {
            params.put("detailAddress", detailAddress);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + addressId + isDefault));
        client.post(context, getUrl("updateUserDeliveryAddress.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void delUserDeliveryAddress(Context context, String addressIds, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("addressIds", addressIds);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + addressIds));
        client.post(context, getUrl("delUserDeliveryAddress.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryCityName(Context context, int areaType, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("areaType", String.valueOf(areaType));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + areaType));
        client.post(context, getUrl("qryCityName.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryB2CBanners(Context context, int position, Integer limit, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("position", String.valueOf(position));
        if (limit != null) {
            params.put("limit", String.valueOf(limit));
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + position));
        client.post(context, getUrl("qryB2CBanners.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qrySellBestGoods(Context context, int page, int pageNum, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("page", String.valueOf(page));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qrySellBestGoods.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsItems(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryGoodsItems.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryAllEpGoods(Context context, String goodsName, int page, int pageNum, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("goodsName", String.valueOf(goodsName));
        params.put("page", String.valueOf(page));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qryAllEpGoods.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsByItemId(Context context, long itemId, int page, int pageNum, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("itemId", String.valueOf(itemId));
        params.put("page", String.valueOf(page));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + itemId + page + pageNum));
        client.post(context, getUrl("qryGoodsByItemId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUserOrders(Context context, int length, Long lastOrderTime, String status, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", String.valueOf(length));
        if (lastOrderTime != null) {
            params.put("lastOrderTime", String.valueOf(lastOrderTime));
        }

        if (!TextUtils.isEmpty(status)) {
            params.put("status", status);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + length));
        client.post(context, getUrl("qyrUserOrders.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryOrderInfo(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", String.valueOf(orderId));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryOrderInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmOrder(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmGoodsGroupPurchaseOrder(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmGoodsGroupPurchaseOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEPGoodsForHot(Context context, Integer limit, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        if (limit != null) {
            params.put("limit", String.valueOf(limit));
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEPGoodsForHot.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryExpressFeeByProviceId(Context context, int proviceId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("proviceId", String.valueOf(proviceId));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + proviceId));
        client.post(context, getUrl("qryExpressFeeByProviceId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void addTradeLeadsInfo(Context context, int type, String title, String detail, String brand, int amount, long price, String address, String phone, long expiryDate, String url, ResponseHandlerInterface handler, String... paths) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("type", String.valueOf(type));
        params.put("title", title);
        params.put("detail", detail);
        params.put("brand", brand);
        params.put("amount", String.valueOf(amount));
        params.put("price", String.valueOf(price));
        params.put("phone", phone);
        params.put("address", address);
        params.put("expiryDate", expiryDate);
        if (paths != null && paths.length > 0) {
            for (int i = 0; i < paths.length && i < 6; ++i) {
                try {
                    params.put("image" + (i + 1), new File(paths[i]), "application/octet-stream");
                } catch (FileNotFoundException var19) {
                    var19.printStackTrace();
                }
            }
        } else {
            params.put("image1", new ByteArrayInputStream(new byte[0]), "test.jpg", "application/octet-stream");
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + type));
        client.post(context, url + "addTradeLeadsInfo.do", getHeaders(context), params, "application/octet-stream", handler);
    }

    public static void qryLogisticsDetailByOrderId(Context context, long expressCompanyId, String expressSerial, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("expressCompanyId", String.valueOf(expressCompanyId));
        params.put("expressSerial", expressSerial);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + expressCompanyId + expressSerial));
        client.post(context, getUrl("qryLogisticsDetailByOrderId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHaveNewestOrderInfor(Context context, long lastQryTimeStamp, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastQryTimeStamp", String.valueOf(lastQryTimeStamp));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastQryTimeStamp));
        client.post(context, getUrl("qryHaveNewestOrderInfor.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGroupPurchaseGoodsList(Context context, int page, int pageNum, String goodsName, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("page", page);
        params.put("pageNum", pageNum);
        params.put("goodsName", goodsName);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qryGroupPurchaseGoodsList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsGroupPurchaseDetail(Context context, int purchaseId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("purchaseId", purchaseId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + purchaseId));
        client.post(context, getUrl("qryGoodsGroupPurchaseDetail.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsGroupPurchaseOrderInfo(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryGoodsGroupPurchaseOrderInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void getWorkMeetingDetail(Context context, int meetingId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("meetingId", meetingId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + meetingId));
        client.post(context, "http://122.224.218.55:555/lqsw_website/getWorkMeetingDetail.do", getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryWorkMeetingList(Context context, long lastSerialCode, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastSerialCode", lastSerialCode);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastSerialCode + length));
        client.post(context, "http://122.224.218.55:555/lqsw_website/qryWorkMeetingList.do", getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryPresellGoodsList(Context context, int page, int pageNum, String goodsName, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("page", page);
        params.put("pageNum", pageNum);
        params.put("goodsName", goodsName);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qryPresellGoodsList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsPresellDetail(Context context, int presellId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("presellId", presellId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + presellId));
        client.post(context, getUrl("qryGoodsPresellDetail.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void confirmGoodsPresellOrder(Context context, String json, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("json", json);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("confirmGoodsPresellOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGoodsPresellOrderInfo(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("qryGoodsPresellOrderInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void cancelOrder(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("cancelOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void deleteOrder(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + orderId));
        client.post(context, getUrl("deleteOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseAddressBookList(Context context, long lastTimeStamp, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastTimeStamp", String.valueOf(lastTimeStamp));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastTimeStamp));
        client.post(context, getUrl("qryEnterpriseAddressBookList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseAddressBookList(Context context, long lastTimeStamp, String isPhoneNo, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastTimeStamp", String.valueOf(lastTimeStamp));
        if (isPhoneNo != null) {
            params.put("isPhoneNo", isPhoneNo);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastTimeStamp));
        client.post(context, getUrl("qryEnterpriseAddressBookList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseYellowPage(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseYellowPage.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void userLogin(Context context, String account, String password, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("password", MD5.MD5Encode(password));
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + MD5.MD5Encode(password)));
        Log.e("e", getUrl("userLogin.do"));
        client.post(context, getUrl("userLogin.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void getVerificationCode(Context context, String account, int msgType, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("msgType", String.valueOf(msgType));
        params.put("enterpriseId", String.valueOf(ENTERPRISE_ID));
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID + msgType));
        client.post(context, getUrl("getVerificationCode.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void checkVerificationCode(Context context, String account, String verificationCode, int msgType, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("verificationCode", String.valueOf(verificationCode));
        params.put("msgType", String.valueOf(msgType));
        params.put("enterpriseId", String.valueOf(ENTERPRISE_ID));
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID + verificationCode + msgType));
        client.post(context, getUrl("checkVerificationCode.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void registerAccount(Context context, String account, String password, String username, int sex, String nickname, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("enterpriseId", String.valueOf(ENTERPRISE_ID));
        params.put("password", MD5.MD5Encode(password));
        params.put("username", String.valueOf(username));
        params.put("sex", String.valueOf(sex));
        params.put("nickname", String.valueOf(nickname));
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID + MD5.MD5Encode(password)));
        client.post(context, getUrl("registerAccount.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryAccountInfo(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp));
        client.post(context, getUrl("qryAccountInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void modAccountInfo(Context context, String nickName, String sex, String birthday, String contactPhone, String contactMail, String contactAddress, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        if (!TextUtils.isEmpty(nickName)) {
            params.put("nickName", nickName);
        }

        if (!TextUtils.isEmpty(sex)) {
            params.put("sex", sex);
        }

        if (!TextUtils.isEmpty(birthday)) {
            params.put("birthday", birthday);
        }

        if (!TextUtils.isEmpty(contactPhone)) {
            params.put("contactPhone", contactPhone);
        }

        if (!TextUtils.isEmpty(contactMail)) {
            params.put("contactMail", contactMail);
        }

        if (!TextUtils.isEmpty(contactAddress)) {
            params.put("contactAddress", contactAddress);
        }

        params.put("cid", cid3(timeStamp));
        client.post(context, getUrl("modAccountInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void modPassword(Context context, String oldPassword, String newPassword, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("oldPassword", MD5.MD5Encode(oldPassword));
        params.put("newPassword", MD5.MD5Encode(newPassword));
        params.put("cid", cid3(timeStamp + MD5.MD5Encode(oldPassword) + MD5.MD5Encode(newPassword)));
        client.post(context, getUrl("modPassword.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUseServiceFinished(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryUseServiceFinished.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void resetPasswordFirstStep(Context context, String account, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp));
        client.post(context, getUrl("resetPasswordFirstStep.do"), getHeaders(context, account), params, "application/xml;charset=UTF-8", handler);
    }

    public static void resetPasswordSecondStep(Context context, String account, String verifyCode, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("verifyCode", verifyCode);
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + verifyCode));
        client.post(context, getUrl("resetPasswordSecondStep.do"), getHeaders(context, account), params, "application/xml;charset=UTF-8", handler);
    }

    public static void resetPasswordThirdStep(Context context, String account, String verifyCode, String newPassword, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("verifyCode", verifyCode);
        params.put("newPassword", MD5.MD5Encode(newPassword));
        params.put("cid", cid(account + ACCOUNTTYPE + CLIENTTYPE + timeStamp + MD5.MD5Encode(newPassword) + verifyCode));
        client.post(context, getUrl("resetPasswordThirdStep.do"), getHeaders(context, account), params, "application/xml;charset=UTF-8", handler);
    }

    public static void uploadUserImage(Context context, String path, ResponseHandlerInterface handler) throws FileNotFoundException {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("imageData", new File(path), "application/octet-stream");
        params.put("cid", cid3(timeStamp));
        client.post(context, getUrl("uploadUserImage.do"), getHeaders(context), params, "application/octet-stream", handler);
    }

    public static void qryCommentListByUser(Context context, long currentCommentTime, int length, Integer commentLength, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("currentCommentTime", String.valueOf(currentCommentTime));
        params.put("length", String.valueOf(length));
        if (commentLength != null) {
            params.put("commentLength", String.valueOf(commentLength));
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + currentCommentTime + length));
        client.post(context, getUrl("qryCommentListByUser.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void addComment(Context context, String targetType, String targetValue, String content, Long targetUserId, String targetUserAccount, Long commentId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("targetType", targetType);
        params.put("targetValue", targetValue);
        params.put("content", content);
        if (targetUserId != null) {
            params.put("targetUserId", String.valueOf(targetUserId));
        }

        if (!TextUtils.isEmpty(targetUserAccount)) {
            params.put("targetUserAccount", targetUserAccount);
        }

        if (commentId != null) {
            params.put("commentId", String.valueOf(commentId));
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + targetType + targetValue));
        client.post(context, getUrl("addComment.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void delComment(Context context, String targetType, String targetValue, long commentId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("targetType", targetType);
        params.put("targetValue", targetValue);
        params.put("commentId", String.valueOf(commentId));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + targetType + targetValue + commentId));
        client.post(context, getUrl("delComment.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryCommentList(Context context, String targetType, String targetValue, long currentCommentTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("targetType", targetType);
        params.put("targetValue", targetValue);
        params.put("currentCommentTime", String.valueOf(currentCommentTime));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + targetType + targetValue + currentCommentTime + length));
        client.post(context, getUrl("qryCommentList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryCommentMoreByUser(Context context, String targetType, String targetValue, long currentCommentTime, int commentLength, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("targetType", targetType);
        params.put("targetValue", targetValue);
        params.put("currentCommentTime", String.valueOf(currentCommentTime));
        params.put("commentLength", String.valueOf(commentLength));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + targetType + targetValue + currentCommentTime + commentLength));
        client.post(context, getUrl("qryCommentMoreByUser.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryCommentPraiseNum(Context context, String targetType, String targetValue, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("targetType", targetType);
        params.put("targetValue", targetValue);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + targetType + targetValue));
        client.post(context, getUrl("qryCommentPraiseNum.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHotContentList(Context context, long currentPublishTime, int pagesize, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("currentPublishTime", String.valueOf(currentPublishTime));
        params.put("length", String.valueOf(pagesize));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + currentPublishTime + pagesize));
        client.post(context, getUrl("qryHotContentList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryMsgByIdAction(Context context, String msgId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("msgId", msgId);
        params.put("cid", cid3(timeStamp + msgId + ENTERPRISE_ID));
        client.post(context, getUrl("qryMsgById.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryHaveNewComment(Context context, long lastQryTime, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastQryTime", String.valueOf(lastQryTime));
        params.put("enterpriseId", ENTERPRISE_ID);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + lastQryTime));
        client.post(context, getUrl("qryHaveNewComment.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void delMsgBySendId(Context context, String msgSendId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("msgSendId", msgSendId);
        params.put("cid", cid3(timeStamp + msgSendId));
        client.post(context, getUrl("delMsgBySendId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void readMsgBySendId(Context context, String msgSendId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("msgSendId", msgSendId);
        params.put("cid", cid3(timeStamp + msgSendId));
        client.post(context, getUrl("readMsgBySendId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryMsgsByPosition(Context context, String position, String writeSource, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("position", position);
        if (!TextUtils.isEmpty(writeSource)) {
            params.put("writeSource", writeSource);
        }

        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + position));
        client.post(context, getUrl("qryMsgsByPosition.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryUnReadTotal(Context context, String writeSource, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        if (!TextUtils.isEmpty(writeSource)) {
            params.put("writeSource", writeSource);
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryUnReadTotal.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void activateEcard(Context context, String account, String cardNum, String cardPwd, String activateType, String fromType, String acceptAccount, String password, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp, account);
        params.put("cardNum", cardNum);
        params.put("cardPwd", cardPwd);
        params.put("activateType", activateType);
        params.put("fromType", fromType);
        if (!TextUtils.isEmpty(acceptAccount)) {
            params.put("acceptAccount", acceptAccount);
        }

        if (!TextUtils.isEmpty(password)) {
            params.put("password", MD5.MD5Encode(password));
        }

        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + cardNum + cardPwd + activateType + fromType));
        client.post(context, getUrl("activateEcard.do"), getHeaders(context, account), params, "application/xml;charset=UTF-8", handler);
    }

    public static void checkEcard(Context context, String cardNum, String cardPwd, String fromType, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cardNum", cardNum);
        params.put("cardPwd", cardPwd);
        params.put("fromType", fromType);
        if (fromType.equals("1")) {
            params.put("account", ACCOUNT);
            params.put("cid", cid3(timeStamp + ENTERPRISE_ID + cardNum + cardPwd + fromType));
        } else if (fromType.equals("0")) {
            params.put("cid", cid(CLIENTTYPE + timeStamp + ENTERPRISE_ID + cardNum + cardPwd + fromType));
        }

        client.post(context, getUrl("checkEcard.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEcardOrderRecorderList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryEcardOrderRecorderList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryRecommendBookList(Context context, int page, int pageNum, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("page", String.valueOf(page));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + page + pageNum));
        client.post(context, getUrl("qryRecommendBookList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void addReadBook(Context context, long contentId, int isOnline, long startTime, long endTime, String fromType, Long chapterId, String chapterName, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("contentId", String.valueOf(contentId));
        params.put("isOnline", String.valueOf(isOnline));
        params.put("startTime", String.valueOf(startTime));
        params.put("endTime", String.valueOf(endTime));
        params.put("fromType", fromType);
        if (chapterId != null) {
            params.put("chapterId", String.valueOf(chapterId));
        }

        params.put("chapterName", TextUtils.isEmpty(chapterName) ? "--" : chapterName);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + contentId + isOnline + startTime + endTime + fromType));
        client.post(context, getUrl("addReadBook.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void delReadBook(Context context, long contentId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("contentId", String.valueOf(contentId));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + contentId));
        client.post(context, getUrl("delReadBook.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBookInfoById(Context context, long bookId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("bookId", String.valueOf(bookId));
        params.put("cid", cid3(timeStamp + bookId));
        client.post(context, getUrl("qryBookInfoById.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBooksByColumnId(Context context, int columnId, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("columnId", String.valueOf(columnId));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + columnId + pageNum + length));
        client.post(context, getUrl("qryBooksByColumnId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBooksByNameOrAuthur(Context context, String condition, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("bookNameOrAuthor", condition);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + pageNum + length));
        client.post(context, getUrl("qryBooksByNameOrAuthur.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBooksList(Context context, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryBooksList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryChapterInfo(Context context, String bookId, String chapterId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("contentId", bookId);
        params.put("chapterId", chapterId);
        params.put("enterpriseId", ENTERPRISE_ID);
        params.put("cid", cid3(timeStamp + bookId + chapterId));
        client.post(context, getUrl("qryChapterInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseJournalList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryEnterpriseJournalList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseNewsList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryEnterpriseNewsList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseZoneBanner(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseZoneBanner.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseZoneBookByType(Context context, String blockTypeId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("blockTypeId", blockTypeId);
        params.put("cid", cid3(timeStamp + blockTypeId + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseZoneBookByType.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseZoneBookIndex(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseZoneBookIndex.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseZoneBookMore(Context context, String blockTypeId, String blockId, String firstSortId, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("blockTypeId", blockTypeId);
        params.put("blockId", blockId);
        if (!TextUtils.isEmpty(firstSortId)) {
            params.put("firstSortId", firstSortId);
        }

        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + blockTypeId + blockId + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryEnterpriseZoneBookMore.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryReadBookList(Context context, Long id, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("id", String.valueOf(id));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryReadBookList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qrySpecialInfoList(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qrySpecialInfoList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBookSortList(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp));
        client.post(context, getUrl("qryBookSortList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryBookListBySort(Context context, int firstSortId, int secondSortId, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("firstSortId", String.valueOf(firstSortId));
        params.put("secondSortId", String.valueOf(secondSortId));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + firstSortId + secondSortId + pageNum + length));
        client.post(context, getUrl("qryBookListBySort.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGameList(Context context, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryGameList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryGamesByColumnId(Context context, int columnId, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("columnId", String.valueOf(columnId));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + columnId + pageNum + length));
        client.post(context, getUrl("qryGamesByColumnId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void downLoadContent(Context context, long contentId, String downType, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("contentId", String.valueOf(contentId));
        params.put("downType", downType);
        params.put("enterpriseId", ENTERPRISE_ID);
        params.put("cid", cid3(timeStamp + contentId + downType));
        client.post(context, getUrl("downLoadContent.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryModuleContentList(Context context, long moduleId, long currentPublishTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("moduleId", String.valueOf(moduleId));
        params.put("currentPublishTime", String.valueOf(currentPublishTime));
        params.put("length", String.valueOf(length));
        params.put("enterpriseId", ENTERPRISE_ID);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + moduleId + currentPublishTime + length));
        client.post(context, getUrl("qryModuleContentList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryModuleList(Context context, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryModuleList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryImageList(Context context, long atlasId, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("atlasId", String.valueOf(atlasId));
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + atlasId + pageNum + length));
        client.post(context, getUrl("qryImageList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryImageModule(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + pageNum + length));
        client.post(context, getUrl("qryImageModule.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void deleteTopic(Context context, long topicId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("topicId", topicId);
        params.put("cid", cid(ACCOUNT + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID + topicId));
        client.post(context, getUrl("deleteTopic.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryReplyRelateMeCount(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid(ACCOUNT + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryReplyRelateMeCount.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryCommentRelateMeList(Context context, long currentCommentTime, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("currentCommentTime", String.valueOf(currentCommentTime));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + currentCommentTime + length));
        client.post(context, getUrl("qryCommentRelateMeList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void readReplyRelateMe(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid(ACCOUNT + ACCOUNTTYPE + CLIENTTYPE + timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("readReplyRelateMe.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    /**
     * 我的二维码
     */
    public static void getUserQR(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("epId", String.valueOf(ENTERPRISE_ID));
        params.put("userNo", String.valueOf(ACCOUNT));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, Api.ROOT_URL + "getUserQR.do", getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void feedBack(Context context, String content, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("content", content);
        params.put("cid", cid3(timeStamp));
        client.post(context, getUrl("feedBack.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryNewVersion(Context context, int versionCode, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("versionCode", String.valueOf(versionCode));
        params.put("cid", cid3(timeStamp + versionCode));
        client.post(context, getUrl("qryNewVersion.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void lionAppAuth(ResponseHandlerInterface handler) {
        RequestParams params = new RequestParams();
        params.put("app_id", "shanwen");
        params.put("app_secret", APPSECRET);
        client.post(BLUELION_URL + "/wapp/apps/auth", params, handler);
    }

    public static void lionUserAuth(String uid, String token, ResponseHandlerInterface handler) {
        RequestParams params = new RequestParams();
        params.put("uid", uid);
        params.put("token", token);
        client.post(BLUELION_URL + "/wapp/users/auth", params, handler);
    }

    public static void lionGetWechat(Context context, String accesstoken, ResponseHandlerInterface handler) {
        client.get(context, BLUELION_URL + "/wechat", getHeaders(accesstoken), (RequestParams) null, handler);
    }

    private static Header[] getHeaders(String accesstoken) {
        ArrayList headers = new ArrayList();
        headers.add(new BasicHeader("Connection", "Keep-Alive"));
        headers.add(new BasicHeader("Chartset", "UTF-8"));
        headers.add(new BasicHeader("Cache-Control", "no-cache"));
        headers.add(new BasicHeader("User-Agent", "shanwen"));
        headers.add(new BasicHeader("Accept-Language", "zh-CN,en-US"));
        headers.add(new BasicHeader("ACCESSTOKEN", accesstoken));
        return (Header[]) headers.toArray(new Header[headers.size()]);
    }

    private static String getUrl(String action) {
        return URL + action;
    }

    private static String cid(String value) {
        return Base64.base64Encode(value, LOGIN_KEY, "UTF-8");
    }

    public static String cid3(String value) {
        StringBuffer sb = (new StringBuffer(ACCOUNT)).append(ACCOUNTTYPE).append(CLIENTTYPE);
        return cid(sb.append(value).toString());
    }

    private static Header[] getHeaders(Context context) {
        ArrayList headers = new ArrayList();
        headers.add(new BasicHeader("Connection", "Keep-Alive"));
        headers.add(new BasicHeader("Chartset", "UTF-8"));
        headers.add(new BasicHeader("Cache-Control", "no-cache"));
        headers.add(new BasicHeader("Accept-Language", "zh-CN,en-US"));
        headers.add(new BasicHeader("client-imei", CLIENT_IMEI));
        headers.add(new BasicHeader("user-ip", USER_IP));
        if (!TextUtils.isEmpty(ACCOUNT)) {
            headers.add(new BasicHeader("phone-number", ACCOUNT));
        }

        return (Header[]) headers.toArray(new Header[headers.size()]);
    }

    private static Header[] getHeaders(Context context, String account) {
        ArrayList headers = new ArrayList();
        headers.add(new BasicHeader("Connection", "Keep-Alive"));
        headers.add(new BasicHeader("Chartset", "UTF-8"));
        headers.add(new BasicHeader("Cache-Control", "no-cache"));
        headers.add(new BasicHeader("Accept-Language", "zh-CN,en-US"));
        headers.add(new BasicHeader("client-imei", CLIENT_IMEI));
        headers.add(new BasicHeader("user-ip", USER_IP));
        if (!TextUtils.isEmpty(account)) {
            headers.add(new BasicHeader("phone-number", account));
        }

        return (Header[]) headers.toArray(new Header[headers.size()]);
    }

    public static void qryGradeUserSignList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", String.valueOf(pageNum));
        params.put("length", String.valueOf(length));
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + length + pageNum));
        client.post(context, getUrl("qryGradeUserSignList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseAreaCompanyList(Context context, long lastTimeStamp, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("lastTimeStamp", lastTimeStamp);
        params.put("cid", cid3(timeStamp + lastTimeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseAreaCompanyList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryEnterpriseLevelAreaList(Context context, int provinceId, int cityId, int areaId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("provinceId", provinceId);
        params.put("cityId", cityId);
        params.put("areaId", areaId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseLevelAreaList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void createChatRoom(Context context, long groupId, String groupName, String isInitiative, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("groupId", groupId);
        params.put("groupName", groupName);
        params.put("isInitiative", isInitiative);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + groupId));
        client.post(context, getUrl("createChatRoom.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void toggleCloseStat(Context context, long groupId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("groupId", groupId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + groupId));
        client.post(context, getUrl("toggleCloseStat.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryReadBookByBookId(Context context, long bookId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("bookId", bookId);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID + bookId));
        client.post(context, getUrl("qryReadBookByBookId.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    /**
     * 分层通讯录数据接口
     */
    public static void qryEnterpriseGroupLevelist(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("qryEnterpriseGroupLevelist.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }
    /****************************党费缴纳********************************/
    public static void getPartyFeeOrderInfo(Context context, long orderId, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("cid", cid3(timeStamp + orderId + ENTERPRISE_ID));
        client.post(context, getUrl("getPartyFeeOrderInfo.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void createPartyFeeOrder(Context context, long orderId, String extraFee, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("orderId", orderId);
        params.put("extraFee", extraFee);
        params.put("cid", cid3(timeStamp + orderId + extraFee + ENTERPRISE_ID));
        client.post(context, getUrl("createPartyFeeOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }

    public static void qryPartyFeeOrderList(Context context, int pageNum, int length, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("pageNum", pageNum);
        params.put("length", length);
        params.put("cid", cid3(timeStamp + pageNum + length + ENTERPRISE_ID));
        client.post(context, getUrl("qryPartyFeeOrderList.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }
    public static void checkHavePartyFeeOrder(Context context, ResponseHandlerInterface handler) {
        String timeStamp = String.valueOf(System.currentTimeMillis());
        RequestParams params = getRequestParams(timeStamp);
        params.put("cid", cid3(timeStamp + ENTERPRISE_ID));
        client.post(context, getUrl("checkHavePartyFeeOrder.do"), getHeaders(context), params, "application/xml;charset=UTF-8", handler);
    }
}

